<%@ page pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" language="java" trimDirectiveWhitespaces="false" %>
<%@ include file="/WEB-INF/view/include/taglibs.jspf" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Admin Template</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <script src="${ctx}/js/lib/jquery-1.11.2.min.js"></script>
    <link rel="stylesheet" href="${ctx}/css/base.css"/>
    <link rel="stylesheet" href="${ctx}/css/admin.css"/>
    <link rel="stylesheet" href="${ctx}/css/menu.css"/>
    <script src="${ctx}/js/lib/layer/layer.min.js"></script>
    <%--<link rel="stylesheet" href="${ctx}/css/form.css"/>--%>
    <%--<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css">--%>
    <%--<link rel="stylesheet" href="css/end-theme.css" />--%>
    <%--<link rel="stylesheet" href="css/menu.css" />--%>
    <%--<link rel="stylesheet" href="res/main/css/index.css" />--%>
    <!--[if lt IE 9]>
    <script src="res/public/bootstrap/js/html5shiv.min.js"></script>
    <script src="res/public/bootstrap/js/respond.min.js"></script>
    <![endif]-->
    <style type="text/css">
        body {
            margin: 0;
            padding: 0;
            color: #333;
            font-family: "微软雅黑",Arial,"宋体";
            font-size: 12px;
        }
        .header {
            overflow: visible;
            /*margin-bottom: 0;*/
            /*margin-right: 0;*/
            /*margin-left: 0;*/
            /*padding-left: 0;*/
            /*padding-right: 0;*/
            height: 50px;
        }
        .sidebar {
            position: absolute;
            top: 61px;
            bottom: 0;
            width: 218px;
            border-right: 1px solid #ccc;
            /*background-color: #f2f2f2;*/
        }
        .main-container {
            position: absolute;
            top: 61px;
            left: 219px;
            right: 0;
            bottom: 0;
            /*padding: 18px 23px 30px;*/
        }
        .header {
            height: 60px;
            border-bottom: 1px solid #828282;
            background: #509ee1;
            position: relative;
            z-index: 2;
        }
        #terminal-iframe {
            border: 0;
            width: 100%;
        }
        .content-iframe {
            width: 99.9%;
            height: 100%;
            background-color: #fff;
        }
    </style>
</head>
<body>
<div class="header">

</div>
<div class="sidebar">
    <div id="scrollmenu">
        <div class="scrollbar disable" style="height: 417px;">
            <div class="track" style="height: 417px;">
                <div class="thumb" style="top: 0; height: 417px;">
                    <div class="end"></div>
                </div>
            </div>
        </div>
        <div class="viewport" style="height: 417px; overflow: hidden;">
            <div class="overview" style="top: 0;">
                <!--scrollbar start-->
                <div class="menubox">
                    <div class="title" id="t1" onclick="void(0);/*DisplayMenu('leftmenu01');*/" title="点击切换显示或隐藏" data-target="term.jsp"> 网站系统管理 </div>
                    <div id="leftmenu01" style="display: block;">
                        <a href="../../admin.jsp" target="main">管理员管理</a>
                        <a href="config/" target="main">网站信息配置</a>
                        <%--<a href="maintype.php" target="main">多语言站管理</a>--%>
                        <a href="lang/?lang=en_US" target="main">语言包管理</a>
                        <%--<a href="site.php" target="main">站点管理</a>--%>
                        <a href="job/" target="main">定时作业管理</a>
                        <a href="filter/" target="main">安全过滤器管理</a>
                        <a href="../../database.jsp" target="main">数据库管理</a>
                        <a href="/console/" target="main">H2数据库管理</a>
                        <a href="../../gshell.jsp" target="main">Groovy终端</a>
                        <a href="../../term.jsp" target="main">管理终端</a>
                        <%--<a href="upload_filemgr_sql.php" target="main">上传文件管理</a>--%>
                        <%--<a href="database_backup.php" target="main">数据库管理</a>--%>
                        <a href="admingroup.php" target="main" title="管理组管理" class="admingroup"></a>
                    </div>
                </div>
                <!--scrollbar end-->
            </div>
        </div>
    </div>
</div>
<div class="main-container">
    <iframe id="main" name="main" src="" frameborder="0" style="width: 100%; height: 100%;" class="content-iframe"></iframe>
    <!--
    <div class="topToolbar">
        <span class="title">添加管理员</span>
        <a href="javascript:location.reload();" class="reload">刷新</a>
    </div>
    -->
    <!--
    <form name="form" id="form" method="post" action="admin_save.php" onsubmit="return cfm_admin();">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="formTable">
            <tbody><tr>
                <td width="25%" height="40" align="right">用户名：</td>
                <td width="75%"><input type="text" name="username" class="input" id="username">
                    <span class="maroon">*</span><span class="cnote">带<span class="maroon">*</span>号表示为必填项</span></td>
            </tr>
            <tr>
                <td height="40" align="right">密　码：</td>
                <td><input type="password" name="password" class="input" id="password">
                    <span class="maroon">*</span><span class="cnote">6-16个字符组成，区分大小写</span></td>
            </tr>
            <tr>
                <td height="40" align="right">确　认：</td>
                <td><input type="password" name="repassword" class="input" id="repassword">
                    <span class="maroon">*</span></td>
            </tr>
            <tr>
                <td height="40" align="right">提　问：</td>
                <td><select name="question" id="question">
                    <option value="0">无安全提问</option><option value="1">母亲的名字</option><option value="2">爷爷的名字</option><option value="3">父亲出生的城市</option><option value="4">你其中一位老师的名字</option><option value="5">你个人计算机的型号</option><option value="6">你最喜欢的餐馆名称</option><option value="7">驾驶执照最后四位数字</option>				</select></td>
            </tr>
            <tr>
                <td height="40" align="right">回　答：</td>
                <td><input type="text" name="answer" class="input" id="answer"></td>
            </tr>
            <tr>
                <td height="40" align="right">昵　称：</td>
                <td><input type="text" name="nickname" class="input" id="nickname">
                    <span class="maroon">&nbsp;</span><span class="cnote">用于文章作者的显示</span></td>
            </tr>
            <tr>
                <td height="40" align="right">管理组：</td>
                <td><select name="levelname" id="levelname">
                    <option value="1">超级管理员</option><option value="2">站点管理员</option><option value="3">文章发布员</option>				</select></td>
            </tr>
            <tr class="nb">
                <td height="40" align="right">审　核：</td>
                <td><input type="radio" name="checkadmin" value="true" checked="checked">
                    已审核&nbsp;
                    <input type="radio" name="checkadmin" value="false">
                    未审核</td>
            </tr>
            </tbody></table>
        <div class="formSubBtn">
            <input type="submit" class="submit" value="提交">
            <input type="button" class="back" value="返回" onclick="history.go(-1);">
            <input type="hidden" name="action" id="action" value="add">
        </div>
        JVM 版本: <%= System.getProperty("java.specification.version") %> <br />
        JVM 架构: <%= System.getProperty("sun.arch.data.model", System.getProperty("com.ibm.vm.bitmode")) %> <br />
        服务器信息: ${pageContext.servletContext.serverInfo} <br />
        容器名称: ${pageContext.servletContext.servletContextName} <br />
        Servlet 版本: ${pageContext.servletContext.majorVersion}.${pageContext.servletContext.minorVersion} <br />
    </form>
    -->
</div>
<script type="text/javascript">
    /*
    $('.menubox a').click(function() {
        var index = layer.load(null, 0);
        var target = $(this).attr('href');
        $(this).blur();
        $('.main-container').hide().load(target, function(response, status, xhr) {
            layer.close(index); //关闭loading
            $(this).show().focus();
        });
        return false;
    });
    */
    var h = $('.viewport').height(),
        oh=$('.overview').height();
    $('.scrollbar').height(h).show();
    $('.thumb').height(h * 2 - oh);
    $('.thumb .end').height(h * 2 - oh);

    var press = false, x, y;
    $(document).on('mousedown', '.thumb', function(event) {
        console.log('press')
        press = true;
        console.log(this);
        var offset = $(this).offset();
        x = event.pageX;
        y = event.pageY;
    }).on('mouseenter', '#scrollmenu', function() {
        console.log('enter')
        $('.thumb').show();
    }).on('mouseleave', '#scrollmenu', function() {
        console.log('leave')
        !press && $('.thumb').hide();
    }).on('mouseup', function(event) {
//        console.log('up', event)
        press = false;
    }).on('mousemove', function(event) {
        if (!press) return;
        var a = event.pageX,
            b = event.pageY;
        var pos = $('.thumb').position();

        if (b - y + pos.top < 0 || b - y + pos.top > $('.overview').height() - $('.viewport').height()) {
            return;
        }

        $('.thumb').css({
            top: (b - y) + pos.top
        })
        $('.overview').css({
            top: -(b - y + pos.top)
        })

        x = a;
        y = b;
    }).on('mousewheel', function() {
//        console.log('wheel')
    });

</script>
<style type="text/css">
    #scrollmenu::selection {
        background: #fff;
    }
    .track {
        background: #eee;
    }
</style>
</body>
</html>
